﻿<UserControl x:Class="IM.Client.IMMian"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="500" d:DesignWidth="350" Background="DimGray">
    <UserControl.Resources>
        <SolidColorBrush x:Key="ForeColor">YellowGreen</SolidColorBrush>
        <SolidColorBrush x:Key="BackColor">DimGray</SolidColorBrush>
    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <!--Title  0-->
            <RowDefinition Height="2*" />
            <!--Photo  1-->
            <RowDefinition Height="*"/>
            <!--Search 2-->
            <RowDefinition Height="8*"/>
            <!--Main   3-->
            <RowDefinition Height="1.3*"/>
            <!--Wiget  4-->
        </Grid.RowDefinitions>
        <Canvas Grid.Row="0" Grid.ColumnSpan="2" Height="18">
            <Image x:Name="headImage" Source="Images\mainHead.png" Height="20" Width="20"/>
            <TextBlock x:Name="txtShowTitle" Canvas.Left="25" Canvas.Top="0" Foreground="{StaticResource ForeColor}" FontWeight="ExtraBold">IM企业即时通信</TextBlock>
            <StackPanel Canvas.Right="0" Canvas.Top="0" Height="20" Orientation="Horizontal">
                <Button Width="20" ToolTip="最小化">
                    <Button.Background>
                        <ImageBrush ImageSource="Images\min.png"></ImageBrush>
                    </Button.Background>
                </Button>
                <Button Width="20" ToolTip="最大化">
                    <Button.Background>
                        <ImageBrush ImageSource="Images\maximize_square.png"></ImageBrush>
                    </Button.Background>
                </Button>
                <Button Click="ButtonClose_Click" Width="20" ToolTip="关闭">
                    <Button.Background>
                        <ImageBrush ImageSource="Images\close.png"></ImageBrush>
                    </Button.Background>
                </Button>
            </StackPanel>
        </Canvas>
        <Grid Grid.Row="1">
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <!--<Image Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Source="Img/usertile16.bmp"/>-->
            <StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal">
                <Label VerticalAlignment="Center" x:Name="userName" Foreground="{StaticResource ForeColor}">XXX用户名</Label>
                <ComboBox VerticalAlignment="Center" IsEditable="True" BorderBrush="{StaticResource BackColor}" 
                           Foreground="{StaticResource ForeColor}" Background="{StaticResource BackColor}">
                    <ComboBoxItem>[我在线上]</ComboBoxItem>
                    <ComboBoxItem>[忙碌]</ComboBoxItem>
                    <ComboBoxItem>[离开]</ComboBoxItem>
                </ComboBox>
            </StackPanel>
            <StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal">
                <Button Background="Transparent">
                    <Image Source="Images\weibo.png" Height="20"/>
                </Button>
                <Button Background="Transparent">
                    <Image Source="Images\mail.png" Height="20"/>
                </Button>
                <Button Background="Transparent">
                    <Image Source="Images\weibo.png" Height="20"/>
                </Button>
                <Button Background="Transparent">
                    <!--<Image Source="Images\Twitter_creatures.ico" Height="20"/>-->
                </Button>
            </StackPanel>
        </Grid>
        <TextBox Grid.Row="2" Grid.ColumnSpan="2" Foreground="Gray">搜索栏</TextBox>
        <Grid Grid.Row="3">
            <Grid.RowDefinitions>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.Column="0" Orientation="Vertical">
                <Button Background="Transparent">
                    <Image Source="Images\contacts.png" Height="30"/>
                </Button>
                <Button Background="Transparent">
                    <Image Source="Images\user_group.png" Height="30"/>
                </Button>
                <Button Background="Transparent">
                    <Image Source="Images\weibo.png" Height="30"/>
                </Button>
                <Button Background="Transparent">
                    <Image Source="Images\mail.png" Height="30"/>
                </Button>
            </StackPanel>
            <ListBox Grid.Column="1" ScrollViewer.VerticalScrollBarVisibility="Visible">
                <ListBoxItem>
                    <Expander Header="偶滴好友">
                        <StackPanel Orientation="Horizontal">
                            <!--<Image Source="Img\Mask 01_32x32.png" />-->
                            <TextBlock VerticalAlignment="Center" MouseLeftButtonDown="TextBlock_MouseLeftButtonDown">Ferdinand</TextBlock>
                        </StackPanel>
                    </Expander>
                </ListBoxItem>
                <ListBoxItem>
                    <Expander Header="朋友们">
                        <StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <!--<Image Source="Img\Mask 03_32x32.png" />-->
                                <TextBlock VerticalAlignment="Center">Marcus</TextBlock>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <!--<Image Source="Img\Mask 02_32x32.png" />-->
                                <TextBlock VerticalAlignment="Center">Fergus</TextBlock>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <!--<Image Source="Img\Mask 04_32x32.png" />-->
                                <TextBlock VerticalAlignment="Center">Jay</TextBlock>
                            </StackPanel>
                        </StackPanel>
                    </Expander>
                </ListBoxItem>
            </ListBox>
        </Grid>
        <StatusBar Grid.Row="4" Background="Transparent" >
            <Image Source="Images/Im.png" Height="32" Width="32" Margin="0,0,0,0" MouseLeftButtonDown="Image_MouseLeftButtonDown"></Image>
            <Button Background="Transparent"  Margin="0,0,0,0">
                <Image Source="Images\manager.png" ToolTip="开发平台" />
            </Button>
            <Button Background="Transparent" Padding="0,0,0,0" Margin="-6,0,0,0">
                <Image Source="Images\config_manager.png" ToolTip="配置管理" />
            </Button>
            <Button Background="Transparent" Padding="0,0,0,0" Margin="-6,0,0,0">
                <Image Source="Images\future_projects.png" ToolTip="项目管理" />
            </Button>
            <Button Background="Transparent" Padding="0,0,0,0" Margin="-6,0,0,0" BorderBrush="{StaticResource BackColor}">
                <Image Source="Images\vedioChat.png" ToolTip="视频会议" />
            </Button>
            <Button Background="Transparent" Padding="0,0,0,0" Margin="-6,0,0,0" BorderBrush="{StaticResource BackColor}">
                <Image Source="Images\folder_libary.png" ToolTip="知识库" />
            </Button>
            <Button Background="Transparent" Padding="0,0,0,0" Margin="-6,0,0,0" BorderBrush="{StaticResource BackColor}">
                <Image Source="Images\test.png" ToolTip="测试管理" />
            </Button>
            <Button Background="Transparent" Padding="0,0,0,0" Margin="-6,0,0,0" BorderBrush="{StaticResource BackColor}">
                <Image Source="Images\deploy.png" ToolTip="部署管理" />
            </Button>
            <Button Background="Transparent" Padding="0,0,0,0" Margin="-6,0,0,0" BorderBrush="{StaticResource BackColor}">
                <Image Source="Images\applications.png" ToolTip="应用管理" />
            </Button>
        </StatusBar>
    </Grid>
</UserControl>
